/*
 *-----------------------------------------------------------------------------
 * The confidential and proprietary information contained in this file may
 * only be used by a person authorised under and to the extent permitted
 * by a subsisting licensing agreement from  CHIPSEA.
 *
 *            (C) COPYRIGHT 2015 SHENZHEN CHIPSEA TECHNOLOGIES CO.,LTD.
 *                ALL RIGHTS RESERVED
 *
 * This entire notice must be reproduced on all copies of this file
 * and copies of this file may only be made by a person if such person is
 * permitted to do so under the terms of a subsisting license agreement
 * from CHIPSEA.
 *
 *      Release Information : CSA37FX60 
 *-----------------------------------------------------------------------------
 */

#include "compile_option.h"

#ifdef CS_F60

#ifndef __CSA37FX60_FMC_H
#define __CSA37FX60_FMC_H

#include "csa37fx60.h"
#include "absacc.h"
#include "csa37fx60_lib.h"
typedef enum
{ 
    FMC_APROM = 0x00,
    FMC_LDROM = 0x01,
    FMC_SRAM = 0x02,
    
}FMC_ROM_Mode_TypeDef;



void FMC_Init(void);
uint8_t FMC_ErasePage(uint32_t adr);

uint8_t FMC_WritePage (uint32_t adr, uint16_t sz, uint8_t *buf) ; 
uint32_t FMC_ReadPage (uint32_t adr, uint16_t sz, uint8_t *buf);

void FMC_SwitchROM(FMC_ROM_Mode_TypeDef ROM_Mode);

#endif /* __CSA37FX60_FMC_H */

#endif /* End of CS_F60 */
